package cn.littlehx.simple_score_manage.api;

import cn.littlehx.simple_score_manage.common.R;
import cn.littlehx.simple_score_manage.domain.Score;
import cn.littlehx.simple_score_manage.service.ICourseService;
import cn.littlehx.simple_score_manage.service.IScoreService;
import cn.littlehx.simple_score_manage.service.ITeacherService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/api/score")
public class ScoreController {
    @Autowired
    ITeacherService teacherService;
    @Autowired
    ICourseService courseService;
    @Autowired
    IScoreService scoreService;
    @PostMapping
    public R addScore(@RequestBody Score score){
        scoreService.save(score);
        return R.success();
    }
}
